<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Order extends BaseModel
{
    /**
     *  订单条目列表
     */
    public function items(){
        return $this->hasMany(OrderItem::class);
    }

    public function getStatusText(){
        if($this->status == 0){
            return '未回款';
        }elseif($this->status == 1){
            return '已回款';
        }
        return '未知';
    }
}
